package com.ruoyi.web.controller.interview;

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.interview.domain.InterviewPosition;
import com.ruoyi.interview.service.IInterviewPositionService;
import com.ruoyi.web.util.AIUtils;
import dev.langchain4j.service.AiServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/interview/ai")
public class AIController {
//
//    @Autowired
//    private ChatLanguageModel chatLanguageModel;
//    @Autowired
//    private IInterviewPositionService  interviewPositionService;
//
//    /**
//     * 生成面试问题
//     * @return
//     */
//    @GetMapping("/genQuestion")
//    public AjaxResult generateQuestion(Long id){
//        // 根据岗位ID获取岗位信息
//        InterviewPosition interviewPosition = interviewPositionService.selectInterviewPositionById(id);
//        // 获取岗位考核维度
//        AIUtils aiUtils = AiServices.create(AIUtils.class, chatLanguageModel);
////        String generate = aiUtils.genQuestion(interviewPosition.getName(),5,)
////        JSONObject jsonObject = JSONObject.parseObject(generate, JSONObject.class);
//        return AjaxResult.success();
//    }

}
